package com.jiyun.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jiyun.dto.GoodsDto;
import com.jiyun.entity.Goods;
import com.jiyun.mapper.GoodsMapper;
import com.jiyun.service.IGoodsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 聪哥哥
 * @since 2024-10-16
 */
@Service
public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements IGoodsService {

    @Override
    public Page<GoodsDto> findPage(Integer page, Integer pageSize, GoodsDto goodsDto) {
        Page<GoodsDto> goodsPage = new Page<>(page, pageSize);
        this.baseMapper.findPage(goodsPage,goodsDto);
        return goodsPage;
    }

    @Override
    public List<GoodsDto> findList() {
        return this.baseMapper.findList();
    }
}
